Ver=1
Name =pandamysqlD
lib = lib$(Name).so
obj = lib$(Name).so.$(Ver)
CC =g++ 
all : $(obj)
#	@touch $@
WARN += -Werror
FLAG  = -DLINUX -fPIC  -g3 `pkg-config --cflags --libs glib-2.0`  -D_THREAD_SAFE -D_DEBUG
CSRC = MysqlStorage.cc 

LDEF = -D_FILE_OFFSET_BITS=64 
LLIB = -lmysqlclient  -lstdc++ -lglib-2.0 -lmqpool_tD -lviva

LINC = -I.. -I/home/y/include -L/home/y/lib -I../../core -I../../panda -I../../../mqpool -I/home/y/include/mysql  -I/usr/include  -I../../../viva/include

TGT = $(CSRC:.cc=.o)
%.o : %.cc
	$(CC) $(LDEF) $(LINC) $(FLAG) -c $?
$(obj) : $(TGT)
	$(CC) -s -shared -fPIC -Wall $(LDEF) $(LINC) $(FLAG) $(LLIB)  -o $@ $(TGT)
	ln -sf $(obj) $(lib)
clean:
	rm -rf *.o *.so*
